﻿<UserControl x:Class="Gamey.UI.MameControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:e="http://schemas.codeplex.com/elysium"
             xmlns:t="http://schemas.xceed.com/wpf/xaml/toolkit"
             mc:Ignorable="d"
             d:DesignHeight="600" d:DesignWidth="800">

    <DockPanel>
        <Border DockPanel.Dock="Top" BorderBrush="DeepSkyBlue" BorderThickness="1">
            <t:WatermarkTextBox Name="searchTextBox" Watermark="Search for a game" FontSize="16" Foreground="WhiteSmoke" Padding="5" TextChanged="searchTextBox_TextChanged"/>
        </Border>

        <StatusBar DockPanel.Dock="Bottom" Name="statusBar" Background="Transparent">
            <StatusBarItem>
                <Label Name="statusLabel" FontSize="12" Foreground="WhiteSmoke">Ready</Label>
            </StatusBarItem>
            <StatusBarItem Name="progressBarItem">
                <e:ProgressRing Name="progressBar" State="Indeterminate" Height="20" Width="20"/>
            </StatusBarItem>
        </StatusBar>

        <Grid DockPanel.Dock="Bottom">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>

            <DockPanel LastChildFill="True">
                <TextBox DockPanel.Dock="Left" Name="minimumPlayersTextBox" Foreground="WhiteSmoke" HorizontalContentAlignment="Center" Width="60" GotFocus="minimumPlayersTextBox_GotFocus" TextChanged="minimumPlayersTextBox_TextChanged">0</TextBox>
                <Label FontSize="12" Foreground="WhiteSmoke">Minimum players</Label>
            </DockPanel>

            <DockPanel Grid.Column="1">
                <CheckBox DockPanel.Dock="Right" Name="showAvailableGamesCheckBox" FontSize="12" Margin="10 0" HorizontalAlignment="Right" VerticalAlignment="Center" IsChecked="True" Checked="showAvailableGamesCheckBox_Checked" Unchecked="showAvailableGamesCheckBox_Checked">Show only available games</CheckBox>
                <CheckBox DockPanel.Dock="Right" Name="showLocalGamesCheckBox" FontSize="12" Margin="10 0" HorizontalAlignment="Right" VerticalAlignment="Center" IsChecked="True" Checked="showLocalGamesCheckBox_Checked" Unchecked="showLocalGamesCheckBox_Checked">Show only local games</CheckBox>
            </DockPanel>
        </Grid>

        <DataGrid Name="dataGrid" Margin="0 5" Background="Transparent" AutoGenerateColumns="False" IsReadOnly="True" GridLinesVisibility="None" RowHeight="32" RowHeaderWidth="0" ColumnHeaderStyle="{StaticResource DataGridColumnHeaderStyle}" RowStyle="{StaticResource DataGridRowStyle}" CellStyle="{StaticResource DataGridCellStyle}" MouseDoubleClick="dataGrid_MouseDoubleClick">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=Name}" Header="Name"  Width="120"/>
                <DataGridTextColumn Binding="{Binding Path=Description}" Header="Description" Width="2*"/>
                <DataGridTextColumn Binding="{Binding Path=Locale}" Header="Locale" Width="*"/>
                <DataGridTextColumn Binding="{Binding Path=Manufacturer}" Header="Manufacturer" Width="*"/>
                <DataGridTextColumn Binding="{Binding Path=Year}" Header="Year" Width="80"/>
                <DataGridTextColumn Binding="{Binding Path=Players}" Header="Players" Width="80"/>
            </DataGrid.Columns>
        </DataGrid>
    </DockPanel>

</UserControl>
